package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;


/**
 * The persistent class for the DRUGSTORAGE_HASDRUGS database table.
 * 
 */
@Entity
@Table(name="DRUGSTORAGE_HASDRUGS")
@NamedQuery(name="DrugstorageHasdrug.findAll", query="SELECT d FROM DrugstorageHasdrug d")
public class DrugstorageHasdrug implements Serializable {
	public DrugstorageHasdrug(long drugstorageDrughasdrugsId, BigDecimal medcineNumber, BigDecimal medcineStock) {
		super();
		this.drugstorageDrughasdrugsId = drugstorageDrughasdrugsId;
		this.medcineNumber = medcineNumber;
		this.medcineStock = medcineStock;
	}

	@Override
	public String toString() {
		return "DrugstorageHasdrug [drugstorageDrughasdrugsId=" + drugstorageDrughasdrugsId + ", medcineNumber="
				+ medcineNumber + ", medcineStock=" + medcineStock + "]";
	}

	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="DRUGSTORAGE_DRUGHASDRUGS_ID")
	private long drugstorageDrughasdrugsId;

	@Column(name="MEDCINE_NUMBER")
	private BigDecimal medcineNumber;

	@Column(name="MEDCINE_STOCK")
	private BigDecimal medcineStock;

	//bi-directional many-to-one association to DrugstorageBatchnumber
	@ManyToOne
	@JoinColumn(name="BATCHNUMBER_ID")
	private DrugstorageBatchnumber drugstorageBatchnumber;

	//bi-directional many-to-one association to MedcineDetail
	@ManyToOne
	@JoinColumn(name="MEDCINE_ID")
	private MedcineDetail medcineDetail;

	public DrugstorageHasdrug() {
	}

	public long getDrugstorageDrughasdrugsId() {
		return this.drugstorageDrughasdrugsId;
	}

	public void setDrugstorageDrughasdrugsId(long drugstorageDrughasdrugsId) {
		this.drugstorageDrughasdrugsId = drugstorageDrughasdrugsId;
	}

	public BigDecimal getMedcineNumber() {
		return this.medcineNumber;
	}

	public void setMedcineNumber(BigDecimal medcineNumber) {
		this.medcineNumber = medcineNumber;
	}

	public BigDecimal getMedcineStock() {
		return this.medcineStock;
	}

	public void setMedcineStock(BigDecimal medcineStock) {
		this.medcineStock = medcineStock;
	}

	public DrugstorageBatchnumber getDrugstorageBatchnumber() {
		return this.drugstorageBatchnumber;
	}

	public void setDrugstorageBatchnumber(DrugstorageBatchnumber drugstorageBatchnumber) {
		this.drugstorageBatchnumber = drugstorageBatchnumber;
	}

	public MedcineDetail getMedcineDetail() {
		return this.medcineDetail;
	}

	public void setMedcineDetail(MedcineDetail medcineDetail) {
		this.medcineDetail = medcineDetail;
	}

}